using UnityEngine;
using System.Collections;

public class Tile : MonoBehaviour {
	
	
	public TextMesh indicador;
	
	public int id;
	public void SetData(int line, int column, int id, MapManager mapManager)
	{
		this.line = line;
		this.column = column;
		this.id = id;
		this.mapManager = mapManager;
	}
	
	public int column;
	public int line;
	
	public MapManager mapManager;
	
	void Start () {
	
	}
	
	void OnMouseUp()
	{
		Debug.Log("Meu valor é: " + mapManager.map[line, column]);
		
		TextMesh tm = Instantiate(indicador, transform.position, transform.rotation) as TextMesh;
		tm.text = mapManager.map[line, column].ToString();
		tm.transform.position = new Vector3(transform.position.x, transform.position.y, transform.position.z + 0.5f);
	}
}
